$(function() {
    $("#btnTest").click(function() {

        var token = $("meta[name='_csrf']").attr("content");
        var header = $("meta[name='_csrf_header']").attr("content");
        var contentPath = $("#contentPath").attr('src');

        var url = contentPath + "listCourse?userId=1"+"&" + header + "=" + token;

        $.ajax({
            url: url,
            method:"GET",
            success:function(response) {
                console.log(response);
            },
            error:function(error) {
                console.log(error);
            }
        })
    });
});